/**
* Ejemplo RSS
* Applicast(tm) Widget
*
* (c) 2009 ILERRED, S.L.
*/

//= require <prototype>

//= require <applicast/applicast>
//= require <applicast/dateutil>
//= require <applicast/xmlutil>
//= require <applicast/listview>
//= require <applicast/memopagescroller>

//= require "rss"

//= provide "../../assets"

//////////////////////////////////////////////////////
// Core Events
//////////////////////////////////////////////////////
var App = null;

/**
* onLoad
*/
function onLoad() {
  App = new Widget();
}

/**
* onFocus
*/
function onFocus() { 
  Event.fire('modechange', {mode: WidgetMode.NORMALFOCUS, focus: true});
}

/**
* onUnfocus
*/
function onUnfocus() { 
  Event.fire('modechange', {mode: WidgetMode.NORMALFOCUS, focus: false});
}

/**
* onActivate
*/
function onActivate() {
  Event.fire('modechange', {mode: WidgetMode.ACTIVE});
}

/**
* onUpKey()
*/
function onUpKey() {
  Event.fire('keypress', {keyCode: Event.KEY_UP});
}

/**
* onDownKey
*/
function onDownKey() {
  Event.fire('keypress', {keyCode: Event.KEY_DOWN});
}

/**
* onRightKey
*/
function onRightKey() {
  Event.fire('keypress', {keyCode: Event.KEY_RIGHT});
}

/**
* onLeftKey()
*/
function onLeftKey() {
  Event.fire('keypress', {keyCode: Event.KEY_LEFT});
}